package name.fowler.refactoring.simplestore.model;

public class Rental {

    private Movie movie;
    private int daysRented;
    private double totalPrice;
    private int frequentPoints;

    public Rental(Movie movie, int daysRented) {
        this.movie = movie;
        this.daysRented = daysRented;
        this.totalPrice = movie.getPriceCode().getPrice(daysRented);
        this.frequentPoints = movie.getPriceCode().getPoints(daysRented);
    }

    public int getDaysRented() {
        return daysRented;
    }

    public Movie getMovie() {
        return movie;
    }

    public double getTotalPrice() {
        return totalPrice;
    }

    public int getFrequentPoints() {
        return frequentPoints;
    }
    
}
